package com.rosh.rpc.server.boot;


import com.rosh.rpc.server.register.RpcRegistry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class RpcServerRunner {


    @Autowired
    private RpcRegistry registry;

    @Autowired
    private NettyServer nettyServer;


    public void run() {
        //1 把接口注册到注册中心
        registry.serviceRegistry();
        //2 服务端应用程序
        nettyServer.start();

    }
}
